perm filename TEST2.SAI[GEM,BGB]1 blob sn#030962 filedate 1973-03-25 generic text, type T, neo UTF8
00100	BEGIN "TEST2"
00200		DEFINE !="COMMENT";
00300		DEFINE π="3.1415927";
00400		REQUIRE "⊂⊃⊂⊃" DELIMITERS;
00500		REQUIRE "GEOMES.HDR" SOURCE_FILE;
00600	
00700		INTEGER B1,F,E,V,V0,T;
00800		INTEGER WORLD,WINDOW,CAMERA;
00900	
01000	! UNIVERSE CREATION;
01100	
01200		WORLD ← MKWORLD;	! MAKE A WORLD;
01300		WINDOW ← MKWINDOW;	! MAKE A WINDOW;
01400		CAMERA ← MKCAMERA;	! MAKE A CAMERA;
01500		BATT(WORLD,WINDOW);	! BODY-ATTACH WORLD TO WINDOW;
01600		BATT(CAMERA,WINDOW);	! BODY-ATTACH CAMERA TO WINDOW;
01700		
01800	! BODY CREATION;
01900		
01910		B1 ← MKB(WORLD);
01920		F  ← MKF(B1);
01930		V ← V0  ← MKV(B1); XWC(V) ← 2.0;	! FIRST VERTEX.;
01940		FOR T←1 STEP 1 UNTIL 15 DO		! 15 MORE VERTICES.;
01950		BEGIN V ← MKEV(F,V);ROTATE(V,0,0,π/8);END;
01960		MKFE(V0,F,V);
01970		TRANSLATE(F,0,0,+4);
01975		SWEEP(F,0);
01980		TRANSLATE(F,0,0,-8);
02200	
02300	! ACTION;
02400	
02500		FOR T←1 STEP 1 UNTIL 30 DO
02600			 OUTSTR(13&10);		! FLUSH THE PAGE PRINTER;
02900		WHILE TRUE DO 
03000		BEGIN
03100			ROTATE(B1,0,-π/17,0);	! ROTATION CW ABOUT Y-AXIS;
03200		FOR T←1 STEP 1 UNTIL 40 DO
03300		BEGIN 
03400			ROTATE(B1,π/20,0,0);	! ROTATION CCW ABOUT X-AXIS;
03600			SHOW1(WINDOW,1);	! DISPLAY A SIMULATED IMAGE;
03700			IF INCHRS≥1 THEN DONE;	! EXIT ON TYPE-ANY-KEY;
03800		END;
03900		END;
04000	
04100	END "TEST2"; BGB 22 MARCH 1973.